﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Resources/Master.Master" AutoEventWireup="true" CodeBehind="UpdateBooking.aspx.cs" Inherits="Assignment_3.Feature___Booking.UpdateBooking" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="panelMsg" runat="server"></asp:Panel>

    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="" Display="Dynamic" ControlToValidate="tbxCheckIn" ValidationGroup="bookingFields">
    </asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="" Display="Dynamic" ControlToValidate="tbxCheckOut" ValidationGroup="bookingFields">
    </asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="" Display="Dynamic" ControlToValidate="tbxGuestName" ValidationGroup="bookingFields">
    </asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="" Display="Dynamic" ControlToValidate="tbxPhoneNo" ValidationGroup="bookingFields">
    </asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="" Display="Dynamic" ControlToValidate="tbxEmail" ValidationGroup="bookingFields">
    </asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="" Display="Dynamic" ControlToValidate="tbxAddress" ValidationGroup="bookingFields">
    </asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="" Display="Dynamic" ControlToValidate="tbxPostalCode" ValidationGroup="bookingFields">
    </asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ErrorMessage="" Display="Dynamic" ControlToValidate="tbxCountry" ValidationGroup="bookingFields">
    </asp:RequiredFieldValidator>
<%--    <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ErrorMessage="" Display="Dynamic" ControlToValidate="tbxCardholder" ValidationGroup="paymentFields">
    </asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ErrorMessage="" Display="Dynamic" ControlToValidate="tbxCreditCardNo" ValidationGroup="paymentFields">
    </asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ErrorMessage="" Display="Dynamic" ControlToValidate="tbxExpiryDate" ValidationGroup="paymentFields">
    </asp:RequiredFieldValidator>--%>

    <article class="module width_full">
        <header>
            <h3>Update Individual Booking</h3>
        </header>
        <div class="module_content">
            <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
            <table style="display: inline-block">
                <tr>
                    <th colspan="4">
                        <div id="module_title"><span>Booking</span></div>
                    </th>
                </tr>
                <tr>
                    <th>Rooms' Status
                    </th>
                    <th></th>
                    <th></th>
                    <th></th>
                </tr>
                <tr>
                    <td>
                        <asp:DropDownList ID="ddlRoomsStatus" runat="server">
                            <asp:ListItem>Occupied</asp:ListItem>
                            <asp:ListItem>Reserved</asp:ListItem>
                            <asp:ListItem>Vacant</asp:ListItem>
                            <asp:ListItem>Vacant &amp; Cleaning</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>

                <tr>
                    <th>Check-in Date
                    </th>
                    <th></th>
                    <th>Check-out Date
                    </th>
                    <th></th>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="tbxCheckIn" runat="server" MaxLength="8"></asp:TextBox>
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender9" runat="server" TargetControlID="tbxCheckIn" FilterType="Numbers, Custom" ValidChars="-"></asp:FilteredTextBoxExtender>
                    </td>
                    <td>
                        <asp:ImageButton ID="imgBtnCal1" runat="server" ImageAlign="AbsMiddle" ImageUrl="~/Resources/Images/icn_calendar.png" />
                        <asp:CalendarExtender CssClass="cal_Calendar" ID="calCheckInExTbx" runat="server" TargetControlID="tbxCheckIn" Animated="True" Format="yyyy-MM-dd"></asp:CalendarExtender>
                        <asp:CalendarExtender CssClass="cal_Calendar" ID="calCheckInExBtn" runat="server" TargetControlID="tbxCheckIn" Animated="True" PopupButtonID="imgBtnCal1" Format="yyyy-MM-dd"></asp:CalendarExtender>
                    </td>
                    <td>
                        <asp:TextBox ID="tbxCheckOut" runat="server" MaxLength="8"></asp:TextBox>
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender10" runat="server" TargetControlID="tbxCheckOut" FilterType="Numbers, Custom" ValidChars="-"></asp:FilteredTextBoxExtender>
                    </td>
                    <td>
                        <asp:ImageButton ID="imgBtnCal2" runat="server" ImageAlign="AbsMiddle" ImageUrl="~/Resources/Images/icn_calendar.png" />
                        <asp:CalendarExtender CssClass="cal_Calendar" ID="calCheckOutExTbx" runat="server" TargetControlID="tbxCheckOut" Animated="True" Format="yyyy-MM-dd"></asp:CalendarExtender>
                        <asp:CalendarExtender CssClass="cal_Calendar" ID="calCheckOutExBtn" runat="server" TargetControlID="tbxCheckOut" Animated="True" PopupButtonID="imgBtnCal2" Format="yyyy-MM-dd"></asp:CalendarExtender>
                    </td>
                </tr>

                <tr>
                    <th>Adults<b style="padding-left: 3.3em">Children</b>
                    </th>
                    <th></th>
                    <th></th>
                    <th></th>
                </tr>
                <tr>
                    <td>
                        <asp:DropDownList ID="ddlAdults" runat="server">
                            <asp:ListItem>1</asp:ListItem>
                            <asp:ListItem>2</asp:ListItem>
                            <asp:ListItem>3</asp:ListItem>
                            <asp:ListItem>4</asp:ListItem>
                            <asp:ListItem>5</asp:ListItem>
                            <asp:ListItem>6</asp:ListItem>
                            <asp:ListItem>7</asp:ListItem>
                            <asp:ListItem>8</asp:ListItem>
                            <asp:ListItem>9</asp:ListItem>
                            <asp:ListItem>10</asp:ListItem>
                        </asp:DropDownList><b style="padding-left: 3em"></b>
                        <asp:DropDownList ID="ddlChildren" runat="server">
                            <asp:ListItem>0</asp:ListItem>
                            <asp:ListItem>1</asp:ListItem>
                            <asp:ListItem>2</asp:ListItem>
                            <asp:ListItem>3</asp:ListItem>
                            <asp:ListItem>4</asp:ListItem>
                            <asp:ListItem>5</asp:ListItem>
                            <asp:ListItem>6</asp:ListItem>
                            <asp:ListItem>7</asp:ListItem>
                            <asp:ListItem>8</asp:ListItem>
                            <asp:ListItem>9</asp:ListItem>
                            <asp:ListItem>10</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>

                <tr>
                    <th>Room Type</th>
                    <th></th>
                    <th>Bed Type</th>
                    <th></th>
                </tr>
                <tr>
                    <td>
                        <asp:RadioButtonList ID="rblRoomType" runat="server">
                            <asp:ListItem>Smoking</asp:ListItem>
                            <asp:ListItem>Non-smoking</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                    <td></td>
                    <td rowspan="2" style="padding-bottom: 4em">
                        <asp:DropDownList ID="ddlBedType" runat="server">
                            <asp:ListItem>King</asp:ListItem>
                            <asp:ListItem>Queen</asp:ListItem>
                            <asp:ListItem>Double</asp:ListItem>
                            <asp:ListItem>Single</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td></td>
                </tr>
            </table>

            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

            <table style="display: inline-block">
                <tr>
                    <th colspan="2" style="width: 300px">
                        <div id="module_title"><span>Guest</span></div>
                    </th>
                </tr>
                <tr>
                    <th>Guest Name</th>
                    <th></th>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="tbxGuestName" runat="server" MaxLength="50"></asp:TextBox>
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" FilterType="UppercaseLetters, LowercaseLetters" TargetControlID="tbxGuestName" ValidChars=" "></asp:FilteredTextBoxExtender>
                    </td>
                    <td></td>
                </tr>

                <tr>
                    <th>Phone Number</th>
                    <th></th>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="tbxPhoneNo" runat="server" TextMode="Phone" MaxLength="8"></asp:TextBox>
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" TargetControlID="tbxPhoneNo" FilterType="Numbers"></asp:FilteredTextBoxExtender>
                    </td>
                    <td>&nbsp;</td>
                </tr>

                <tr>
                    <th>Email</th>
                    <th></th>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="tbxEmail" runat="server" TextMode="Email" MaxLength="100"></asp:TextBox>
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="tbxEmail" FilterType="Custom, UppercaseLetters, LowercaseLetters, Numbers" ValidChars="@._-"></asp:FilteredTextBoxExtender>
                    </td>
                    <td></td>
                </tr>

                <tr>
                    <th>Address</th>
                    <th></th>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:TextBox ID="tbxAddress" runat="server" TextMode="MultiLine" Height="50px" Width="300px" MaxLength="200"></asp:TextBox>
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="tbxAddress" FilterType="Custom, UppercaseLetters, LowercaseLetters, Numbers" ValidChars="@#,. "></asp:FilteredTextBoxExtender>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <th>Postal Code</th>
                    <td></td>
                </tr>
                <tr>
                    <th>
                        <asp:TextBox ID="tbxPostalCode" runat="server" MaxLength="9"></asp:TextBox>
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender5" runat="server" TargetControlID="tbxPostalCode" FilterType="Numbers"></asp:FilteredTextBoxExtender>
                    </th>
                    <td></td>
                </tr>
                <tr>
                    <th>Country</th>
                    <td></td>
                </tr>
                <tr>
                    <th>
                        <asp:TextBox ID="tbxCountry" runat="server" MaxLength="50"></asp:TextBox>
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender6" runat="server" TargetControlID="tbxCountry" FilterType="UppercaseLetters, LowercaseLetters" ValidChars=" "></asp:FilteredTextBoxExtender>
                    </th>
                    <td>&nbsp;</td>
                </tr>
            </table>

            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

            <table style="display: inline-block">
                <tr>
                    <th colspan="2" style="width: 300px">
                        <div id="module_title"><span>Payment</span></div>
                    </th>
                </tr>
                <tr>
                    <th>Payment Type</th>
                    <th></th>
                </tr>
                <tr>
                    <td>
                        <asp:RadioButtonList ID="rblPaymentType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="rblPaymentType_SelectedIndexChanged">
                            <asp:ListItem>Cash</asp:ListItem>
                            <asp:ListItem>Credit Card</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                    <td></td>
                </tr>

                <tr>
                    <th>
                        <asp:Label ID="lblCardholderName" runat="server" Text="Name of Cardholder" Visible="False"></asp:Label></th>
                    <th>&nbsp;</th>
                </tr>

                <tr>
                    <th>
                        <asp:TextBox ID="tbxCardholder" runat="server" Visible="False" MaxLength="50"></asp:TextBox>
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender7" runat="server" TargetControlID="tbxCardholder" FilterType="UppercaseLetters, LowercaseLetters" ValidChars=" "></asp:FilteredTextBoxExtender>
                    </th>
                    <th>&nbsp;</th>
                </tr>

                <tr>
                    <th>
                        <asp:Label ID="lblCreditCardNo" runat="server" Text="Credit Card Number" Visible="False"></asp:Label></th>
                    <th></th>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="tbxCreditCardNo" runat="server" Visible="False" MaxLength="15"></asp:TextBox>
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender8" runat="server" TargetControlID="tbxCreditCardNo" FilterType="Numbers"></asp:FilteredTextBoxExtender>
                        <td></td>
                </tr>

                <tr>
                    <th>
                        <asp:Label ID="lblExpiryDate" runat="server" Text="Expiry Date" Visible="False"></asp:Label></th>
                    <th></th>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="tbxExpiryDate" runat="server" Visible="False" Enabled="False"></asp:TextBox>
                        <asp:ImageButton ID="imgBtnCal3" runat="server" ImageAlign="AbsMiddle" ImageUrl="~/Resources/Images/icn_calendar.png" Visible="False" />
                        <asp:CalendarExtender CssClass="cal_Calendar" ID="calExpiryExTbx" runat="server" TargetControlID="tbxExpiryDate" Animated="True" Format="yyyy-MM-dd"></asp:CalendarExtender>
                        <asp:CalendarExtender CssClass="cal_Calendar" ID="calExpiryExBtn" runat="server" TargetControlID="tbxExpiryDate" Animated="True" PopupButtonID="imgBtnCal3" Format="yyyy-MM-dd"></asp:CalendarExtender>
                    </td>
                    <td></td>
                </tr>
            </table>
        </div>

        <p style="text-align: right; padding-right: 2.5em; padding-bottom: 1em">
            <asp:Button ID="btnCommit" runat="server" CssClass="btnGreen" Text="Confirm Changes" OnClick="btnCommit_Click" />&nbsp;&nbsp;<asp:Button ID="btnDiscard" runat="server" CssClass="btnGray" Text="Discard Changes" OnClick="btnDiscard_Click" />&nbsp;&nbsp;<asp:Button ID="btnDelete" runat="server" CssClass="btnGray" Text="Delete Booking" OnClick="btnDelete_Click" /><asp:Button ID="btnConfirmDelete" runat="server" CssClass="btnRed" Text="Confirm Delete" Visible="false" OnClick="btnConfirmDelete_Click" />
        </p>
    </article>
    <!-- end of styles article -->
    <div class="spacer"></div>
</asp:Content>
